package com.example.elm_server_api.service.impl;

import com.example.elm_server_api.domain.UserMsg;
import com.example.elm_server_api.mapper.UserMsgMapper;
import com.example.elm_server_api.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("userService")
@Transactional
public class UserServiceImpl implements IUserService {

    @Autowired
    UserMsgMapper userMsgMapper;

    @Override
    public UserMsg selectByLogin(UserMsg record) {
        return this.userMsgMapper.selectByLogin(record);
    }

    @Override
    public List<UserMsg> selectAll() {
        return this.userMsgMapper.selectAll();
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return this.userMsgMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(UserMsg record) {
        return this.userMsgMapper.updateByPrimaryKeySelective(record);
    }
}
